package com.java_exam.java_exam.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Component
@PropertySource(value = {"classpath:admin.properties"})
@ConfigurationProperties("admin")  //默认从全局变量配置中获取值
public class Admin {
    @TableId(type = IdType.AUTO)
    private Integer adminId;
    private String adminName;
    private String adminPassword;
}
